//
//  ZHHomeAllViewController.m
//  HellowWeex
//
//  Created by 赵鹤 on 2017/4/25.
//  Copyright © 2017年 x298017064010. All rights reserved.
//

#import "ZHHomeAllViewController.h"
#import "QQDrawerViewController.h"
#import "TestViewController.h"


@interface ZHHomeAllViewController ()

@end

@implementation ZHHomeAllViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self setupUI];
    
    
}



- (void)setupUI
{
    self.titleArray = @[@"关注",@"推荐",@"全部"];
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (NSString *titleStirng in self.titleArray) {
        TestViewController *vc = [[TestViewController alloc] init];
//        UINavigationController *navi = [[UINavigationController alloc] initWithRootViewController:vc];
        if ([titleStirng isEqualToString:@"关注"]) {
            vc.weexPath = @"mine";
        }
        if ([titleStirng isEqualToString:@"推荐"]) {
            vc.weexPath = @"recommend";
        }
        if ([titleStirng isEqualToString:@"全部"]) {
            vc.weexPath = @"allplay";
        }
        vc.title = titleStirng;
        [array addObject:vc];
    }
//    self.automaticallyAdjustsScrollViewInsets = YES;
//        self.edgesForExtendedLayout = UIRectEdgeNone;
    
    self.controllerArray = array;
}


//#pragma mark - 父类方法、切换tab
//- (void)scrollViewSelectToIndex:(UIButton *)button
//{
//    [super scrollViewSelectToIndex:button];
//}
////
//- (void)scrollViewDidScroll:(UIScrollView *)scrollView
//{
//    [super scrollViewDidScroll:scrollView];
//}
//
//- (void)selectButton:(NSInteger)index
//{
//    [super selectButton:index];
//}



///**
// 打开抽屉
// */
//- (void)openDrawer{
//    [[QQDrawerViewController shareDrawerViewController] openDrawerWithOpenDuration:0.2];
//}
//
//
///**
// 关闭抽屉
// */
//- (void)closeDrawer{
//    [[QQDrawerViewController shareDrawerViewController] closeDrawerWithOpenDuration:0.2];
//}
//


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
